﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.Net.Http;

namespace posttracker
{
    public partial class GetData : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //this.Controls;
        }

       
        protected void TextBox1_TextChanged(object sender, EventArgs e)
        {

        }

        protected void Button1_Click1(object sender, EventArgs e)
        {
            HttpRequest req =  new HttpRequest();
    
            HttpClient client = new HttpClient(); 
            client.BaseAddress = new Uri("http://localhost:8081/"); 
            HttpResponseMessage response = await client.GetAsync("api/contacts"); 
            Contact[] contacts = await response.Content.ReadAsAsync<Contact[]>();
        }
    }
}